package cn.webrx;

import java.util.*;

public class Set2 {
    public static void main(String[] args) {
        Set<String> set = new HashSet<>();
        set.add(null);

        System.out.println(set.size());

        //写程序实现消除ArrayList集合中的重复元素
        List<Integer> list = new ArrayList<>(List.of(1,2,3,4,1,2,2,2,2,5,4));
        System.out.println(list);
        Set<Integer> ss = new HashSet<>(list);
        System.out.println(ss);

    }

}
